home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / hypercrd / scrptngd.hqx / Script Manager / stack_-1.xml < prev   
Extensible Markup Language  |  1992-05-11  |  15KB  |  34 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>11</cardCount>
  7.     <cardID>7241</cardID>
  8.     <listID>8066</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>-- Script Manager 1.0-- ┬⌐ 1989 Peter J├╢rgensen, Hamilton, NY-- AutoDoc 1.0 scripts-- ┬⌐ 1989 Peter J├╢rgensen, Hamilton, NYon getHomeInfo -- Merge with or replace original script!global stacks,applications,documents,userNameglobal override,autocomp,compLimit -- new globalsset lockScreen to trueset lockMessages to truepush this cdgo to cd "User Preferences" of stack "Home"put cd fld "User Name" into userNameset userLevel to cd fld "User Level"set powerKeys to the hilite of btn "Power Keys"set blindTyping to the hilite of btn "Blind Typing"put the hilite of btn "autocomp" into autocomp -- newput the hilite of btn "No Autodoc" into override -- newput cd fld "Compaction Limit" into compLimit -- newput fld "paths" of cd "stacks" into stacksput fld "paths" of cd "applications" into applicationsput fld "paths" of cd "documents" into documentspop cdend getHomeInfoon openStack -- Merge with or replace original handler!if the short name of this stack is "Script Manager" then show cd fld "copyright" of cd 1global autodoc,curstackput checkauto() into autodocput the long name of this stack into curStackgetScript "stack"pass OpenStackend openStackon CloseStack -- Merge with or replace original handler!checkScript "stack"global complimit,autocompif autocomp is "true" thenif the Freesize of this stack > complimit * 1000 thenAnswer "Compact stack?" with "No" or "Yes"if it is "Yes" then doMenu "Compact Stack"end ifend ifPass CloseStackend CloseStackon openBackground -- Merge with or replace original handler!global curBgput the long name of this background into CurBggetScript "bg"pass openBackgroundend openBackgroundon CloseBackground -- Merge with or replace original handler!checkScript "bg"pass CloseBackgroundend CloseBackgroundon openCard -- Merge with or replace original handler!global curCdput the long name of this card into CurCdgetScript "card"pass OpenCardend openCardon CloseCard -- Merge with or replace original handler!idlecheckScript "card"Pass CloseCardend CloseCardon deletefieldstoppass deletefieldend deletefieldon deletebuttonstoppass deletebuttonend deletebuttonon checkScript anObject-- (c) 1988 Peter J├╢rgensen - Hamilton, NYglobal stackScript,bgScript,CardScript,autodoc,theObjectif autodoc is empty then put false into autodocif autodoc thenif anObject = "stack" thenget the script of this stackif it is not StackScript thendocumentChanges "Stack",""end ifput false into autodocelse if anObject = "bg" thenget the script of this bgif it is not bgScript thendocumentChanges "bg",trun (the long name of this bg)end ifelse if anObject = "card" thenput empty into theObjectget the script of this cdif it is not cardScript thendocumentChanges "card",trun (the long name of this card)end ifend ifend ifend checkScripton stopglobal theObjectput empty into theObjectend stopon newStackAnswer "Install autodoc in this stack?" with "No" or "Yes"if it is "No" then exit newStackcheckAndAdd -- cd  fld "modifications"end newStackon NewVersionglobal AutoDoc,theObject,overrideput empty into theObjectput override into curoverrideput false into overrideput empty into autodocif autodoc is empty then put checkauto() into autodocif AutoDoc thenpush this cardset the lockmessages to trueAnswer "OK to clear modification record?" with "NO!" or "OK"┬¼or "Save A Copy"if it is "NO!" then exit NewVersionif it is "Save A Copy" then doMenu "Save a copy..."get line 1 of cd fld "modifications" of cd 1if char 1 of it is not "V" then put 0 into versionelse put word 2 of it into versionAsk "Present version is: "&version&"; change to:" with version+.1if it is empty then exit NewVersionput "Version"&& it && "of"&& the name of this stack &&┬¼"as of " & the date & " at " & the time&┬¼return into cd fld "modifications" of cd 1set the script of this stack to clearmods(the script of this stack)lock screenrepeat with b = 1 to the number of bgsset the cursor to watchgo cd 1 of bg bset the script of this bg to clearmods(the script of this bg)repeat with bb = 1 to the number of bg btnsset the script of bg btn bb to clearmods(the script of bg btn bb)end repeatrepeat with f = 1 to the number of fldsset the script of fld f to clearmods(the script of fld f)end repeatend repeatrepeat with c = 1 to the number of cdsset the cursor to plusgo cd cset the script of this cd to clearmods(the script of this cd)repeat with b = 1 to the number of btnsset the script of btn b to clearmods(the script of btn b)end repeatrepeat with cf = 1 to the number of cd fldsset the script of cd fld cf to clearmods(the script of cd fld cf)end repeatend repeatend ifpop cardgetscript "stack"getscript "bg"getscript "card"put curoverride into override-- ┬⌐ 1988 Peter Jorgensen-- Script for clearing modification documentation from scripts of-- all objects in a stack and incrementing version number on-- card field "Modifications" of card 1 of stack and clearing-- modification records from same field.end NewVersionfunction clearMods aScriptput "Modified " & "on" into theKeyif aScript contains theKey thenrepeat with ln = (the number of lines in aScript) down to 1set the cursor to busyif line ln of aScript contains theKey thendelete line ln of aScriptend ifend repeatend ifreturn aScriptend clearModsfunction extractHandler hdlNo,aScript--Modified by Peter J├╢rgensen on Tuesday, November 14, 1989 at 11:16:38 AMglobal EndofPrevif hdlNo = 1 then put 1 into EndOfPrevrepeat with ScriptLine = EndOfPrev to the number of lines in aScriptset the cursor to busyif word 1 of line scriptLine of aScript is in "on,function" thenput word 2 of line ScriptLine of aScript into theMessageput line ScriptLine of aScript into HdlrScriptrepeat with hdlrLine = ScriptLine+1 to the number of lines in aScriptset the cursor to busyput return&line hdlrLine of aScript after HdlrScriptif (line hdlrLine of aScript contains "send") then next repeatif (line hdlrLine of aScript contains "end")┬¼and (line hdlrLine of aScript contains theMessage) thenput hdlrLine into EndOfPrevreturn HdlrScriptend ifend repeatend ifend repeatreturn "No more Handlers"end extractHandleron documentChanges anObject,ObjectNameglobal newscript,oldScript,theScript,StackScript,CardScript,┬¼BgScript,usernameAnswer "Documenting " &anObject with "Cancel" or"OK" or "Save Copy"if it is "Cancel" then exit documentChangesif it is "Save Copy" then doMenu "Save a Copy..."put the script of anObject into newScriptif (anObject contains "button") or (anObject contains "field") thenput theScript into oldScriptelse if anObject contains "stack" thenput StackScript into oldScriptelse if anObject contains "bkgnd" thenput bgScript into oldScriptelse put CardScript into oldScriptput 1 into hndlerNorepeatset the cursor to busy-- compare the handlers, and document the changed ones.put extractHandler(hndlerNo,newScript) into aHandlerif aHandler = "No more Handlers" then exit repeatif not (oldScript contains aHandler) thenput return & "-" & "-" & "Modified by " & username && "on " & the long date &┬¼" at " & the long time after line 1 of aHandlerend ifput aHandler & return & return after documentedScriptadd 1 to hndlerNoend repeatput "-" & "-" & "Modified " & "on " & the long date &┬¼"-" & the long time & return before documentedScriptset the script of anObject to documentedScriptput ObjectName &" modified by "& username&& "on " & the long date &&┬¼"at" && the time & return after cd fld "Modifications" of cd 1end documentChangeson getScript anObjectglobal stackScript,bgScript,CardScript,autodoc,CurStack,CurBg,CurCdlock screenset the lockmessages to trueif autodoc is empty then put false into autodocif AutoDoc thenif anObject is "stack" thenput the script of this stack into stackScriptelse if anObject is "bg" thenput the script of this bg into bgScriptelse if anObject is "card" thenput the script of this cd into CardScriptend ifend ifset the lockscreen to falseset the lockmessages to falseend getScripton idleglobal theObject,theScript,AutoDoc,CurStack,CurBg,CurCdif the long name of this stack is not CurStack thenput the long name of this stack into CurStackput checkauto() into autodocgetScript "stack"end ifif the long name of this background is not CurBg thenput the long name of this background into CurBggetScript "bg"end ifif the long name of this cd is not CurCd thenstopput the long name of this card into CurCdgetscript "card"end ifif AutoDoc thenif theObject is not empty thenif the mouseloc is not within the rect of theObject thenif the script of theObject is not theScript thendocumentchanges theObject,trun(the long name of theObject)end ifput empty into theObjectput empty into theScriptend ifend ifend ifpass idleend idlefunction checkAutoglobal overrideif override is empty then put false into overrideif (the userlevel is 5) and (not override) thenset the lockmessages to trueset the lockscreen to truepush cdgo cd 1repeat with f = 1 to the number of cd fldsif the short name of cd fld f is "modifications" thenpop cdreturn trueend ifend repeatpop cdend ifreturn falseend checkAutofunction trun aNameput offset("of stack",aName) into theTaildelete char (theTail-1) to (the number of chars in aName) of aNamereturn aNameend trunon modsglobal FldSettingsif FldSettings is empty thenpush cardgo cd 1put the rect of cd fld "Modifications" into line 1 of FldSettingsput the style of cd fld "Modifications" into line 2 of FldSettingsput the visible of cd fld "Modifications" into line 3 of FldSettingsput the textfont of cd fld "Modifications" into line 4 of FldSettingsput the textsize of cd fld "Modifications" into line 5 of FldSettingsput the textstyle of cd fld "Modifications" into line 6 of FldSettingsput the textalign of cd fld "Modifications" into line 7 of FldSettingsset the rect of cd fld "Modifications" of cd 1 to 8,24,502,331set the style of cd fld "Modifications" to "Scrolling"show cd fld "Modifications" of cd 1set the textfont of cd fld "Modifications" to "Monaco"set the textsize of cd fld "Modifications" to 12set the textstyle of cd fld "Modifications" to "plain"set the textalign of cd fld "Modifications" to "left"elseset the rect of cd fld "Modifications" to line 1 of FldSettingsset the style of cd fld "Modifications" to line 2 of FldSettingsset the visible of cd fld "Modifications" to line 3 of FldSettingsset the textfont of cd fld "Modifications" to line 4 of FldSettingsset the textsize of cd fld "Modifications" to line 5 of FldSettingsset the textstyle of cd fld "Modifications" to line 6 of FldSettingsset the textalign of cd fld "Modifications" to line 7 of FldSettingsput empty into FldSettingspop cardend ifend modson mouseEnter-- automatic script getter for buttons and flds-- (c) 1988 Peter J├╢rgensen - Hamilton, NYglobal theObject,theScript,AutoDoc,peekingif autodoc is empty then put false into autodocif autoDoc thenif the name of the target contains "bkgnd button" thenput "bg button id " into theObjectelse if the name of the target contains "button" thenput "button id " into theObjectelse if the name of the target contains "card field" thenput "card field id " into theObjectelse if the name of the target contains "field" thenput "field id " into theObjectend ifput the id of the target after theObjectif peeking is "true" thenput theObjectend ifput the script of theObject into theScriptend ifpass mouseEnterend mouseEnteron checkAndAdd -- adds cd fld "modifications" to cd 1 of a stack, if-- it isn't already there.-- (c) 1988 Peter J├╢rgensen - Hamilton, NYif the cantmodify of this stack is true thenAnswer "This stack cannot be modified." with "OK"exit checkAndAddend ifrepeat with f = 1 to the number of cd fldsif the short name of cd fld f is anObject thenAnswer ObjectKind&&quote& anObject&quote&&"already exists"┬¼with "OK"exit checkAndAddend ifend repeatput the number of cd flds into lastFieldput lastField + 1 into myFielddoMenu "New Field"set the name of cd fld myfield to "modifications"set the rect of cd fld myfield to 8,24,502,331set the style of cd fld myfield to "Scrolling"set the textfont of cd fld myfield to "Monaco"hide cd fld "Modifications"Answer "Auto Doc fld has been added."choose browse toolend checkAndAddfunction extractFname aPathName-- version 1.0 ┬⌐ 1989 Peter J├╢rgensen, Hamiton, NY-- this handler returns a file's name given it's full pathname-- ┬⌐ 1989 Peter J├╢rgensenrepeatget offset(":",aPathName)if it is 0 then return aPathNamedelete char 1 to it of aPathNameend repeatend extractFname</script>
  17.     <background id="2848" file="background_2848.xml" name="" />
  18.     <background id="3642" file="background_3642.xml" name="search scripts" />
  19.     <background id="4118" file="background_4118.xml" name="HomeBG" />
  20.     <background id="5075" file="background_5075.xml" name="AutoDoc" />
  21.     <background id="6205" file="background_6205.xml" name="" />
  22.     <card id="7241" file="card_7241.xml" marked="false" name="" owner="6205" />
  23.     <card id="5618" file="card_5618.xml" marked="false" name="Search Scripts" owner="3642" />
  24.     <card id="2725" file="card_2725.xml" marked="false" name="knowns" owner="2848" />
  25.     <card id="8755" file="card_8755.xml" marked="false" name="Script Investigator" owner="2848" />
  26.     <card id="6714" file="card_6714.xml" marked="false" name="Simple Editor" owner="5075" />
  27.     <card id="2198" file="card_2198.xml" marked="false" name="AutoDoc" owner="5075" />
  28.     <card id="2304" file="card_2304.xml" marked="false" name="Utility Functions" owner="5075" />
  29.     <card id="6108" file="card_6108.xml" marked="false" name="PopNote" owner="5075" />
  30.     <card id="3262" file="card_3262.xml" marked="false" name="User Preferences" owner="4118" />
  31.     <card id="7722" file="card_7722.xml" marked="false" name="dePunch" owner="4118" />
  32.     <card id="10391" file="card_10391.xml" marked="false" name="tabs to commas" owner="4118" />
  33. </stack>
  34.